/* 适配移动设备的基础样式，根据vite.config.js中的rem配置 */
.travelContainer {
  width: 100%;
  max-width: 10rem;
  margin: 0 auto;
  padding: 0.2rem;
  box-sizing: border-box;
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  background-color: #f5f7fa;
  min-height: 100vh;
}

.travelHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0;
  margin-bottom: 0.2rem;
}

.headerLeft {
  display: flex;
  align-items: center;
}

.backButton {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.2rem;
  color: #333;
  font-size: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.backButton:hover {
  color: #4a90e2;
}

.travelHeader h1 {
  font-size: 0.48rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.refreshButton {
  padding: 0.12rem 0.24rem;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 0.06rem;
  font-size: 0.28rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.refreshButton:hover {
  background: #3a7bd5;
}

.refreshButton:disabled {
  background: #aac8e4;
  cursor: not-allowed;
}

.travelList {
  height: calc(100vh - 1.6rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.2rem;
}

.travelItem {
  background: white;
  border-radius: 0.16rem;
  box-shadow: 0 0.04rem 0.16rem rgba(0, 0, 0, 0.05);
  margin-bottom: 0.32rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.travelItem:hover {
  transform: translateY(-0.04rem);
  box-shadow: 0 0.12rem 0.24rem rgba(0, 0, 0, 0.08);
}

.travelImage {
  position: relative;
  width: 100%;
  height: 4rem;
  overflow: hidden;
}

.travelImage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.travelItem:hover .travelImage img {
  transform: scale(1.05);
}

.travelRating {
  position: absolute;
  top: 0.16rem;
  right: 0.16rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 0.08rem 0.16rem;
  border-radius: 0.32rem;
  font-size: 0.28rem;
  display: flex;
  align-items: center;
}

.starIcon {
  color: #ffde34;
  margin-right: 0.08rem;
  font-size: 0.32rem;
}

.travelContent {
  padding: 0.24rem;
}

.travelName {
  font-size: 0.36rem;
  font-weight: 600;
  margin: 0 0 0.12rem 0;
  color: #2c3e50;
}

.travelDesc {
  font-size: 0.28rem;
  color: #666;
  margin: 0 0 0.16rem 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.travelInfo {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.16rem;
  font-size: 0.24rem;
  color: #666;
}

.travelLocation {
  display: flex;
  align-items: center;
}

.locationIcon {
  margin-right: 0.08rem;
  color: #4a90e2;
}

.travelFooter {
  display: flex;
  align-items: center;
  margin-top: 0.2rem;
  padding-top: 0.2rem;
  border-top: 0.01rem solid #eee;
}

.travelPrice {
  font-size: 0.4rem;
  font-weight: bold;
  color: #ff6b6b;
}

.travelPurchase {
  font-size: 0.24rem;
  color: #999;
  margin-left: 0.16rem;
  flex: 1;
}

.travelBookBtn {
  padding: 0.12rem 0.28rem;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 0.06rem;
  font-size: 0.28rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.travelBookBtn:hover {
  background: #ff5252;
}

.loadingMore {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem;
  color: #999;
  font-size: 0.28rem;
}

.loadingSpinner {
  width: 0.32rem;
  height: 0.32rem;
  border: 0.04rem solid rgba(74, 144, 226, 0.3);
  border-top-color: #4a90e2;
  border-radius: 50%;
  margin-right: 0.16rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.noMoreData {
  text-align: center;
  padding: 0.32rem;
  color: #999;
  font-size: 0.28rem;
}

/* 为不同评分设置不同颜色 */
.ratingVariant1 {
  background: rgba(255, 107, 107, 0.8);
}

.ratingVariant2 {
  background: rgba(74, 144, 226, 0.8);
}

.ratingVariant3 {
  background: rgba(76, 175, 80, 0.8);
}

/* 为不同价格设置不同颜色 */
.priceVariant1 {
  color: #4a90e2;
}

.priceVariant2 {
  color: #ff6b6b;
}

.priceVariant3 {
  color: #4caf50;
}

.priceVariant4 {
  color: #ff9800;
}

/* 自适应布局 */
@media screen and (min-width: 768px) {
  .travelList {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem;
  }
  
  .travelItem {
    margin-bottom: 0;
  }
  
  .loadingMore, .noMoreData {
    grid-column: span 2;
  }
}

@media screen and (min-width: 1200px) {
  .travelList {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .loadingMore, .noMoreData {
    grid-column: span 3;
  }
}

/* 为了让下拉刷新更加平滑的过渡效果 */
.travelItem {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
  transform: translateY(0.2rem);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(0.2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 让每个项目有不同的动画延迟，产生瀑布流效果 */
.animationDelay1 { animation-delay: 0.1s; }
.animationDelay2 { animation-delay: 0.2s; }
.animationDelay3 { animation-delay: 0.3s; }
.animationDelay4 { animation-delay: 0.4s; }
.animationDelay5 { animation-delay: 0.5s; }
